package com.orange.cetback.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.orange.cetback.pojo.entity.UserAnswers;
import com.orange.cetback.mapper.UserAnswersMapper;
import com.orange.cetback.service.UserAnswersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenenjun
 * @since 2025-03-05
 */
@Service
public class UserAnswersServiceImpl extends ServiceImpl<UserAnswersMapper, UserAnswers> implements UserAnswersService {

    @Override
    public List<UserAnswers> getUserAnswersByRecordId(Long recordId) {
        LambdaQueryWrapper<UserAnswers> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(UserAnswers::getRecordId, recordId);
        List<UserAnswers> userAnswers = this.baseMapper.selectList(wrapper);
        return userAnswers;
    }
}
